#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int cnt, p[N];
int n;
bool st[N];
void solve() {
  for (int i = 2; i <= n; ++i) {
    if (!st[i]) p[cnt++] = i;
    for (int j = 0; p[j] <= n / i; ++j) {
      st[p[j] * i] = true;
      if (i % p[j] == 0) break;
    }
  }
}
int main() {
  cin >> n;
  solve();
  cout << cnt << endl;
}
